package com.ihr360.excel.vo;

import com.ihr360.commons.lang.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author richey
 */
public abstract class AbstractSpreadSheetValidateResult implements SpreadSheetValidateResult {

    private List<SpreadSheetValidatorError> errors = new ArrayList<>();

    private SpreadSheetValidInterruptError interruptError;

    /**
     * 处理过的结果
     */
    private byte[] convertResult;

    public boolean isHasErrors() {
        return CollectionUtils.isNotEmpty(errors);
    }

    public List<SpreadSheetValidatorError> getErrors() {
        return errors;
    }

    @Override
    public void setErrors(List<SpreadSheetValidatorError> errors) {
        this.errors = errors;
    }

    public byte[] getConvertResult() {
        return convertResult;
    }

    public void setConvertResult(byte[] convertResult) {
        this.convertResult = convertResult;
    }

    public SpreadSheetValidInterruptError getInterruptError() {
        return interruptError;
    }

    public void setInterruptError(SpreadSheetValidInterruptError interruptError) {
        this.interruptError = interruptError;
    }
}
